<template>
  <div class="v6-m-login">
    <span>用户登录</span>
	  <div class="v6-u-login-content">
      <input type="text" v-model="user.name" placeholder="用户名" required><br>
      <input type="password" v-model="user.pwd" @keyup.enter="login" placeholder="密码" required><br>
      <button @click="login" class="v6-u-login-btn">登录</button>
    </div>
  </div>
</template>

<script>
export default{
  data:function(){
    return {
      user:{name:'',pwd:''}
    }
  },
  methods:{
    login:function(){
			sessionStorage.setItem('user','d.name');
			location.href='/vendor/';
      // $.web('/api/main/token',this.user,function(d){
      //   sessionStorage.setItem('user',d.name);
      //   location.href=d.path;
      // })
    }
  }
}
</script>

<style scoped>
.v6-m-login{
	width: 100%;
	max-width: 360px;
	margin: 0 auto;
	min-height: 200px;
	box-sizing: border-box;
	padding: 10px;
	margin-top: 100px;
}
.v6-m-login span{ font-size: 24px;line-height: 60px; text-align: center; margin-bottom: 20px; display: block;}
.v6-u-login-content{ line-height: 36px;}
.v6-u-login-content input{
	display: inline-block;
	width: 100%;
	height: auto;
	margin-bottom: 25px;
	border: 1px solid #dcdcdc;
	padding: 12px;
	font-size: 16px;
	line-height: 20px;
	transition: border-color 0.8s ease-in-out;
	-webkit-appearance: none;
}
.v6-u-login-content input:focus{ outline: none;	border-color: #3DA8F5; border-radius: 3px;}
.v6-u-login-btn{
	 background: #3DA8F5 ;
	 color: #fff;
	 text-align: center;
	 width:100%;
	 margin-bottom: 25px;
	 font-size: 16px;
	padding: 12px;
	line-height: 20px;
	border:none;
	border-radius: 3px;
}
</style>
